package binary;

public class ComplementDemo {
    public static void main(String[] args) {
        //规律数
        /*int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println(Integer.toBinaryString(max));
        System.out.println(Integer.toBinaryString(min));
        System.out.println(Integer.toBinaryString(-1));*/

        int n = -45;
        System.out.println(Integer.toBinaryString(n));//11111111111111111111111111010011
        System.out.println(n);
        int x = 0b10101010110;
        System.out.println(x);//1366
        int y = -1366;
        System.out.println(Integer.toBinaryString(y));//11111111111111111111101010101010






    }
}
